package com.example.viewex;

import android.app.Activity;
import android.content.Intent;
import android.view.MenuItem;
import android.widget.ImageView;

public class OptionMenu {


	Activity activity;

	public OptionMenu(Activity a, MenuItem item) {
		super();
		
		int id = item.getItemId();
    	Intent intent = null;
    	
    	switch(id) {
    	
    	case R.id.list_view:
    		intent = new Intent(a, ListViewActivity.class);
        	break;

    	case R.id.custom_list_view:
    		intent = new Intent(a, CustomListViewActivity.class);
        	break;
        	
    	case R.id.grid_view:
    		// ImageView i = (ImageView)findViewById(R.id.imageView1);
    		
    		intent = new Intent(a, GridViewActivity.class);
        	break;
        	
    	case R.id.web_view:
    		intent = new Intent(a, WebViewActivity.class);
        	break;
        	
    	}
    	
    	a.startActivity(intent);
    	
		// this.activity = activity;
	}

}
